import Md5 from 'js-md5';

export const time = () => {
	const date = new Date();
	return parseInt(date.getTime() / 1000);
};
export const createMd5 = () => {
	return Md5(`azCRxslbwGE19FUL${time()}`);
};

export const baseEnv = "test"; //formal:正式   test:测试
// const base = baseEnv == "test" ? "https://test.rightsart.cn" : "https://www.rightsart.cn";
// const base = baseEnv == "test" ? "https://heilian.rightsart.cn" : "https://www.rightsart.cn";
// const base = baseEnv == "test" ? "http://8.218.64.149/api" : "http://8.218.64.149/api";
const base = baseEnv == "test" ? "https://d2ria0xz2u66np.cloudfront.net/api" : "https://api.seemyshow.cn/api";
// const base = baseEnv == "test" ? "http://baapp.xiaorenwu.site/api" : "http://baapp.xiaorenwu.site/api";
export const baseUrl = `${base}`; //接口地址
const pathName = baseEnv == "test" ? "webtest" : "web"; //打包后的目录名字,需要在打包前定义好,打包后手动更改
export const qrCodeUrl = `${base}/${pathName}/#/pages/login/register`; //注册地址,邀请好友生成二维码时用到

export const payment = `${base}/hybrid/payment_h5.html`;
// export const payment = "http://127.0.0.1:5500/payment_h5.html";
